package com.usian;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "usian-cart-service")
public interface CartFeign {

    @RequestMapping("getCartByUserId")
    public Map<String,Object> getCartByUserId(@RequestParam String userId);

    @RequestMapping("addCartToRedis")
    public boolean addCartToRedis(@RequestParam String userId,
                                  @RequestBody Map<String,Object>cart);
}
